package com.swz.dcrm.adpter;

import android.content.Context;
import android.graphics.Color;

import com.swz.dcrm.R;
import com.swz.dcrm.base.ViewHolder;
import com.swz.dcrm.model.CarParam;

import java.util.List;

public class CarParamAdapter extends CustomAdapter<CarParam> {
    public CarParamAdapter(Context context, List<CarParam> datas) {
        super(context, R.layout.item_car_param, datas);
    }

    @Override
    protected void convert(ViewHolder holder, CarParam carParam, int position) {
            holder.setText(R.id.tv_key,carParam.getCnName());
            holder.setText(R.id.tv_value,carParam.getValue());
            if(position%2==0){
                holder.itemView.setBackgroundColor(Color.parseColor("#eef1f6"));
            }else {
                holder.itemView.setBackgroundColor(Color.parseColor("#f4f6f9"));
            }
    }
}
